package svc

import (
	_ "github.com/lib/pq"
	 {{.imports}}
	 "github.com/zeromicro/go-zero/core/stores/sqlx"
)
type ServiceContext struct {
	Config config.Config
	Flake *snowflake.Node
}

func NewServiceContext(c config.Config) *ServiceContext {
	conn := sqlx.NewSqlConn("postgres", c.Postgres.DataSource)
	flake, err := snowflake.NewNode(c.SnowflakeNode)
	return &ServiceContext{
		Config:c,
		Flake:flake,
	}
}
